#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:exercise1.py
# author:wmf
# datetime:2021/4/16 22:13
# software: PyCharm
'''
this is function description
'''


# import module your need


#  定义一个dog类(颜色, 名称), 里面有一个狗叫的方法;
#  不同的狗叫声可能不一样(打打印提示语句, XXX狗在叫,来体现叫声不一样);
#  然后实例化几条狗, 然后统计实例化狗的数量


count = [0]


class dog:

    def __init__(self, color, name):
        self.color = color
        self.name = name
        count[0] += 1

    def bark(self):
        print("%s狗在叫" % self.name)


d1 = dog("黄色","小黄")
d2 = dog("黑色","小黑")
d1.bark()
d2.bark()
print("有%d只狗"%count[0])